package com.baseframe.common.constant;


import com.baseframe.launch.constant.BaseAppConstant;

/**
 * 启动参数配置
 */
public interface BaseLauncherConstant {

    //================ 服务名称 =============================================================================

    String PREFIX = "base-";//前缀

    String AUTH_SERVICE = PREFIX + "auth";

    String USER_SERVICE = PREFIX + "user";

    String SYSTEM_SERVICE = PREFIX + "system";

    String GATEWAY_SERVICE = PREFIX + "gateway";

    String FILE_SERVICE = PREFIX + "file"; //文件服务

    String SMS_SERVICE = PREFIX + "sms";

    String BLOG_SERVICE = PREFIX + "blog"; //博客服务

    String SCORE_SERVICE = PREFIX + "score"; //积分服务

    String MATCH_SERVICE = PREFIX + "match"; //竞赛服务

    String ADVERT_SERVICE = PREFIX + "advert"; //广告服务

    String CHAT_SERVICE = PREFIX + "chat"; //聊天服务

    String TOPIC_SERVICE = PREFIX + "topic";//测验服务

    //================================ 配置 ==================================================================

    /**
     * 开发环境nacos地址
     */
    String NACOS_DEV = "127.0.0.1:8848";
    /**
     * 测试环境环境nacos地址
     */
    String NACOS_TEST = "192.168.2.1:8848";

    /**
     * 生成环境nacos地址
     */
    String NACOS_PROD = "127.0.0.1:8848";


    static String getNacosAddr(String profile) {
        switch (profile) {
            case (BaseAppConstant.ACTIVE_PROD):
                return NACOS_PROD;
            case (BaseAppConstant.ACTIVE_TEST):
                return NACOS_TEST;
            default:
                return NACOS_DEV;
        }
    }

}
